public class ThreadWait2 implements Runnable {
    private LockQC lockQC;

    public ThreadWait2() {
    }

    public ThreadWait2(LockQC lockQC) {
        this.lockQC = lockQC;
    }

    @Override
    public void run() {
        synchronized (lockQC){
            try {
                System.out.println(Thread.currentThread().getName()+"将进入等待wait状态");
                lockQC.wait();
                System.out.println("会继续执行？");
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
